export default [
    { path: '/', redirect: '/home' },
    {
        path: '/home', name: 'home', component: () => import('@/pages/Home'),
        meta: {
            isHiddenNav: true // 根据状态进行判断操作
        }
    },
    // 登录
    {
        path: '/login', name: 'login', component: () => import('@/pages/Login'),// 添加路由元信息，来判断是否需要显示
        meta: {
            isHiddenFooter: true
        }
    },
    // 注册
    {
        path: '/register', name: 'register', component: () => import('@/pages/Register'),// 添加路由元信息，来判断是否需要显示
        meta: {
            isHiddenFooter: true
        }
    },
    // 加入购物车成功
    { path: '/addCart', name: 'addCart', component: () => import('@/pages/addCart') },

    // 购物车
    { path: '/cart', name: 'cart', component: () => import('@/pages/Cart') },



    // 搜索页
    { path: '/search', name: 'search', component: () => import('@/pages/Search') },
    // 详情页
    { path: '/Detail/:id', name: 'Detail', component: () => import('@/pages/Detail') },

    // 结算
    { path: '/trade', name: 'trade', component: () => import('@/pages/Payment/Trade') },

    // 付款界面
    { path: '/pay', name: 'pay', component: () => import('@/pages/Payment/Pay') },

    // 支付成功界面
    { path: '/paySuccess', name: 'paySuccess', component: () => import('@/pages/Payment/PaySuccess') },
    // 订单页面
    { path: '/center', name: 'center', component: () => import('@/pages/Payment/Center') },
]